﻿<%@ Page Title="Asignar Clientes a Cartera" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmClienteCarteraActualizar.aspx.cs" Inherits="Crosland.Automotriz.Web.CRM.wFrmClienteCarteraActualizar" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">


    <script type="text/javascript">

        function pageLoad() {

            var control = document.getElementById('ctl00_cphMain_hfIndicador2');
            cambiarImagenHeader();

            if (control.value == 'S') {
                $find('<%= ((AjaxControlToolkit.CollapsiblePanelExtender)this.Master.FindControl("cpeMenuGeneral")).BehaviorID %>')._doClose();

                control.value = 'N';
            }
        }

</script>

<div class="main-header" style="width:100%;">
     <div class="main-titulo" style="text-align: left">Asignar Clientes a Cartera</div>
</div>

<asp:HiddenField ID="hfIndicador2" runat="server" Value="S" />

<div style="padding: 15px">

    <table width="100%" border="0" cellpadding="7" cellspacing="0">
        <tr>
            <td colspan="2">
                <table width="100%">
                    <tr>
                        <td width="110">
                            <dx:ASPxButton ID="btnRegistrar" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" Height="30px" onclick="btnRegistrar_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Grabar" 
                                Width="100px">
                                <Image Url="~/Images/save_16.gif">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnSalir" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" Height="30px" onclick="btnSalir_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                                Width="100px">
                                <Image Url="~/Images/logout.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <hr width="100%" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 169px">
                <asp:Label ID="Label1" runat="server" Font-Bold="True" ForeColor="Black" 
                    Text="Cliente:"></asp:Label>
            </td>
            <td>
             <asp:Label ID="lblNombreCliente" runat="server" Font-Bold="True" 
                                ForeColor="Black"></asp:Label>
                <table border="0" cellpadding="0" cellspacing="0" width="100%" runat="server" id="tablaConsulta">
                    <tr>
                        <td width="205">
                           
                            <dx:ASPxTextBox ID="txtCliente" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" Height="30px" NullText="Razón Social o RUC" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="200px">
                                <Paddings PaddingLeft="5px" />
                            </dx:ASPxTextBox>
                        </td>
                        <td width="105">
                            <dx:ASPxButton ID="btnConsultar" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" Height="30px" onclick="btnConsultar_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Buscar" 
                                Width="100px">
                                <Image Url="~/Images/search.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <asp:Label ID="lblIdCliente" runat="server" Font-Bold="True" ForeColor="Black" 
                                Visible="False"></asp:Label>

                            

                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td style="width: 169px">
                    <asp:Label ID="Label2" runat="server" Text="Organización de Venta:" 
                        Font-Bold="True" ForeColor="Black"></asp:Label>
                </td>
            <td>
            <dx:ASPxComboBox ID="cboOrganizacion" runat="server" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                        Width="270px" AutoPostBack="True" 
                        onselectedindexchanged="cboOrganizacion_SelectedIndexChanged">
                        <ItemStyle Height="30px" />
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <ButtonStyle Width="20px">
                        </ButtonStyle>
                        <Paddings PaddingLeft="5px" />
                    </dx:ASPxComboBox>
            </td>
        </tr>
        <tr>
            <td style="width: 169px">
                    <asp:Label ID="Label3" runat="server" Text="Canal:" Font-Bold="True" 
                        ForeColor="Black"></asp:Label>
                </td>
            <td>
            <dx:ASPxComboBox ID="cboCanal" runat="server" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                        Width="270px">
                        <ItemStyle Height="30px" />
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <DropDownButton Width="20px">
                        </DropDownButton>
                        <ButtonStyle Width="13px">
                        </ButtonStyle>
                        <Paddings PaddingLeft="5px" />
                    </dx:ASPxComboBox>
            </td>
        </tr>
        <tr>
            <td style="width: 169px">
                    <asp:Label ID="Label4" runat="server" Text="Supervisor de Venta:" 
                        Font-Bold="True" ForeColor="Black"></asp:Label>
                </td>
            <td>
            <dx:ASPxComboBox ID="cboSupervisor" runat="server" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                        Width="270px" IncrementalFilteringMode="Contains">
                        <ItemStyle Height="30px" />
                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                        </LoadingPanelImage>
                        <LoadingPanelStyle ImageSpacing="5px">
                        </LoadingPanelStyle>
                        <DropDownButton Width="20px">
                        </DropDownButton>
                        <ButtonStyle Width="13px">
                        </ButtonStyle>
                        <Paddings PaddingLeft="5px" />
                    </dx:ASPxComboBox>
            </td>
        </tr>
        </table>

    <dx:ASPxPopupControl ID="pcBuscar" runat="server" AllowDragging="True" 
        CloseAction="CloseButton" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" EnableHotTrack="False" HeaderText="Buscar Cliente" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter" 
        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
        Width="800px">
        <HeaderImage Url="~/Images/user.png">
        </HeaderImage>
        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
        </LoadingPanelImage>
        <HeaderStyle>
        <Paddings PaddingLeft="7px" />
        </HeaderStyle>
        <LoadingPanelStyle ImageSpacing="5px">
        </LoadingPanelStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table cellpadding="7" width="100%">
        <tr>
            <td>
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td style="width: 54px">
                            <asp:Label ID="Label5" runat="server" Font-Bold="True" ForeColor="Black" 
                                Text="Cliente:"></asp:Label>
                        </td>
                        <td width="205">
                            <dx:ASPxTextBox ID="txtCliente2" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" Height="30px" NullText="Razón Social o RUC" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="200px">
                                <Paddings PaddingLeft="5px" />
                            </dx:ASPxTextBox>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnConsultar2" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" Height="30px" OnClick="btnConsultar2_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Buscar" 
                                Width="100px">
                                <Image Url="~/Images/search.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <hr />
            </td>
        </tr>
        <tr>
            <td style="height: 11px">
                <dx:ASPxGridView ID="gv" runat="server" AutoGenerateColumns="False" 
                    Caption="Listado de Clientes" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" KeyFieldName="ID_CLIENTE" Width="100%">
                    <Columns>
                        <dx:GridViewDataTextColumn Caption="ID" FieldName="ID_CLIENTE" 
                            ShowInCustomizationForm="True" VisibleIndex="0" Width="70px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Razón Social" FieldName="DES_CLIENTE" 
                            ShowInCustomizationForm="True" VisibleIndex="2">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="RUC / DNI" FieldName="NIF" 
                            ShowInCustomizationForm="True" VisibleIndex="3" Width="100px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Código" FieldName="COD_CLIENTE" 
                            ShowInCustomizationForm="True" VisibleIndex="1" Width="120px">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowDragDrop="False" AllowFocusedRow="True" 
                        AllowGroup="False" AllowSelectByRowClick="True" AllowSelectSingleRowOnly="True" 
                        AllowSort="False" />
                    <SettingsPager Mode="ShowAllRecords">
                    </SettingsPager>
                    <Settings ShowGroupButtons="False" ShowHeaderFilterBlankItems="False" 
                        ShowStatusBar="Hidden" ShowVerticalScrollBar="True" />
                    <SettingsDetail ShowDetailButtons="False" />
                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                        </Header>
                        <LoadingPanel ImageSpacing="5px">
                        </LoadingPanel>
                    </Styles>
                    <StylesPager>
                        <PageNumber ForeColor="#3E4846">
                        </PageNumber>
                        <Summary ForeColor="#1E395B">
                        </Summary>
                    </StylesPager>
                    <StylesEditors ButtonEditCellSpacing="0">
                        <ProgressBar Height="21px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
            </td>
        </tr>
        <tr>
            <td align="right" style="height: 11px" width="100%">
                <table cellpadding="7" cellspacing="0" width="100%">
                    <tr>
                        <td align="left" colspan="4">
                            <hr />
                        </td>
                    </tr>
                    <tr>
                        <td align="left" style="width: 16px">
                            <asp:Label ID="Label15" runat="server" Text="Ver "></asp:Label>
                        </td>
                        <td align="left" style="width: 56px">
                            <dx:ASPxComboBox ID="cboOpcion" runat="server" AllowMouseWheel="False" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" EnableAnimation="False" 
                                EnableDefaultAppearance="False" Height="25px" SelectedIndex="0" 
                                ShowLoadingPanel="False" ShowLoadingPanelImage="False" ShowShadow="False" 
                                Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                Width="60px">
                                <Items>
                                    <dx:ListEditItem Selected="True" Text="100" Value="100" />
                                    <dx:ListEditItem Text="200" Value="200" />
                                    <dx:ListEditItem Text="500" Value="500" />
                                    <dx:ListEditItem Text="1000" Value="1000" />
                                </Items>
                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                </LoadingPanelImage>
                                <LoadingPanelStyle ImageSpacing="5px">
                                </LoadingPanelStyle>
                                <ButtonStyle Width="13px">
                                </ButtonStyle>
                                <Paddings PaddingLeft="5px" />
                                <ValidationSettings>
                                    <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                </ValidationSettings>
                            </dx:ASPxComboBox>
                        </td>
                        <td align="left" style="width: 55px">
                            <asp:Label ID="Label16" runat="server" Text="registros."></asp:Label>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnAceptar" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" Height="30px" OnClick="btnAceptar_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Aceptar" 
                                Width="100px">
                                <Image Url="~/Images/ok.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>


    <dx:ASPxPopupControl ID="popupErrores" runat="server" AllowDragging="True" 
                    ClientInstanceName="popupErrores" CloseAction="CloseButton" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue" 
                    EnableViewState="False" HeaderText="Mensaje" Modal="True" 
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
              Width="300px" EnableHotTrack="False">
                
                    <HeaderImage Url="~/Images/icon_message.png">
                    </HeaderImage>
                
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                    </LoadingPanelImage>
                    <HeaderStyle>
                    <Paddings PaddingLeft="7px" />
                    </HeaderStyle>
                
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                
                 <ContentCollection>
<dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" SupportsDisabledAttribute="True">

    <br />
      <dx:ASPxPanel ID="ASPxPanel3" runat="server" DefaultButton="btCreate">
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent2" runat="server">
                        <table width="100%">
                        <tr>
                        <td align="center" valign="middle">
                        
                        
                        
                            <asp:Label ID="lblMensaje" runat="server"></asp:Label>
                            <br /> &nbsp;</td>
                        
                        </tr>
                        <tr>
                        <td align="center">
                        
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                        
                            <dx:ASPxButton ID="ASPxButton6" runat="server" AutoPostBack="False" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Aceptar" 
                                Width="10px">
                                <ClientSideEvents Click="function(s, e) {
	popupErrores.Hide();
}" />
                                <Image Url="~/Images/ok.png">
                                </Image>
                            </dx:ASPxButton>
                        
                        </td>
                        
                        </tr>
                        
                        
                        </table>




                 </dx:PanelContent>
    </PanelCollection>
   </dx:ASPxPanel>
   </dx:PopupControlContentControl>
</ContentCollection>
                </dx:ASPxPopupControl>

</div>
</asp:Content>
